home *** CD-ROM | disk | FTP | other *** search
- From: envbvs@epb3.lbl.gov (Brian V. Smith)
- Newsgroups: comp.sources.x
- Subject: v06i036: xfig 2.0 patch 4 Part 3/3
- Message-ID: <132968@sun.Eng.Sun.COM>
- Date: 15 Mar 90 07:54:21 GMT
- Approved: argv@sun.com
-
- Submitted-by: envbvs@epb3.lbl.gov (Brian V. Smith)
- Posting-number: Volume 6, Issue 36
- Archive-name: xfig2/patch4c
- Patch-To: xifg2: Volume 6, Issues 9-24
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 3 (of 3)."
- # Contents: panel.c.diff
- # Wrapped by envbvs@epb3.lbl.gov on Mon Mar 12 16:28:08 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'panel.c.diff' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'panel.c.diff'\"
- else
- echo shar: Extracting \"'panel.c.diff'\" \(29567 characters\)
- sed "s/^X//" >'panel.c.diff' <<'END_OF_FILE'
- X*** panel.c.old Mon Feb 26 16:41:18 1990
- X--- panel.c Mon Mar 12 12:04:18 1990
- X***************
- X*** 39,44
- X extern char *printer_list[];
- X extern int INCHES;
- X extern TOOL fontmenu; /* popup menu for printer fonts */
- X
- X /************** local variables and routines **************/
- X
- X
- X--- 39,45 -----
- X extern char *printer_list[];
- X extern int INCHES;
- X extern TOOL fontmenu; /* popup menu for printer fonts */
- X+ extern int figure_modified;
- X
- X /************** local variables and routines **************/
- X
- X***************
- X*** 111,116
- X { 0, 0, 0, 0, &line_ic, F_POLYLINE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &polygon_ic, F_POLYGON, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &box_ic, F_BOX, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &arc_box_ic, F_ARC_BOX, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &text_ic, F_TEXT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &arc_ic, F_CIRCULAR_ARC, set_command, null_proc, S_ON, },
- X
- X--- 112,119 -----
- X { 0, 0, 0, 0, &line_ic, F_POLYLINE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &polygon_ic, F_POLYGON, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &box_ic, F_BOX, set_command, null_proc, S_ON, },
- X+ #ifndef TFX
- X+ /* no rounded-corner boxes with TFX */
- X { 0, 0, 0, 0, &arc_box_ic, F_ARC_BOX, set_command, null_proc, S_ON, },
- X #endif
- X { 0, 0, 0, 0, &text_ic, F_TEXT, set_command, null_proc, S_ON, },
- X***************
- X*** 112,117
- X { 0, 0, 0, 0, &polygon_ic, F_POLYGON, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &box_ic, F_BOX, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &arc_box_ic, F_ARC_BOX, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &text_ic, F_TEXT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &arc_ic, F_CIRCULAR_ARC, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &turn_ic, F_TURN, set_command, null_proc, S_ON, },
- X
- X--- 115,121 -----
- X #ifndef TFX
- X /* no rounded-corner boxes with TFX */
- X { 0, 0, 0, 0, &arc_box_ic, F_ARC_BOX, set_command, null_proc, S_ON, },
- X+ #endif
- X { 0, 0, 0, 0, &text_ic, F_TEXT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &arc_ic, F_CIRCULAR_ARC, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &turn_ic, F_TURN, set_command, null_proc, S_ON, },
- X***************
- X*** 115,120
- X { 0, 0, 0, 0, &text_ic, F_TEXT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &arc_ic, F_CIRCULAR_ARC, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &turn_ic, F_TURN, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &glue_ic, F_GLUE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &break_ic, F_BREAK, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &scale_ic, F_SCALE, set_command, null_proc, S_ON, },
- X
- X--- 119,127 -----
- X { 0, 0, 0, 0, &text_ic, F_TEXT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &arc_ic, F_CIRCULAR_ARC, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &turn_ic, F_TURN, set_command, null_proc, S_ON, },
- X+ #ifdef TFX /* put arrow before glue */
- X+ { 0, 0, 0, 0, &autoarrow_ic, F_AUTOARROW, set_command, null_proc, S_ON, },
- X+ #endif
- X { 0, 0, 0, 0, &glue_ic, F_GLUE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &break_ic, F_BREAK, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &scale_ic, F_SCALE, set_command, null_proc, S_ON, },
- X***************
- X*** 118,123
- X { 0, 0, 0, 0, &glue_ic, F_GLUE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &break_ic, F_BREAK, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &scale_ic, F_SCALE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &autoarrow_ic, F_AUTOARROW, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &addpt_ic, F_ADD_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &deletept_ic, F_DELETE_POINT, set_command, null_proc, S_ON, },
- X
- X--- 125,131 -----
- X { 0, 0, 0, 0, &glue_ic, F_GLUE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &break_ic, F_BREAK, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &scale_ic, F_SCALE, set_command, null_proc, S_ON, },
- X+ #ifndef TFX /* put arrow after glue */
- X { 0, 0, 0, 0, &autoarrow_ic, F_AUTOARROW, set_command, null_proc, S_ON, },
- X #endif
- X { 0, 0, 0, 0, &addpt_ic, F_ADD_POINT, set_command, null_proc, S_ON, },
- X***************
- X*** 119,124
- X { 0, 0, 0, 0, &break_ic, F_BREAK, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &scale_ic, F_SCALE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &autoarrow_ic, F_AUTOARROW, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &addpt_ic, F_ADD_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &deletept_ic, F_DELETE_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &move_ic, F_MOVE, set_command, null_proc, S_ON, },
- X
- X--- 127,133 -----
- X { 0, 0, 0, 0, &scale_ic, F_SCALE, set_command, null_proc, S_ON, },
- X #ifndef TFX /* put arrow after glue */
- X { 0, 0, 0, 0, &autoarrow_ic, F_AUTOARROW, set_command, null_proc, S_ON, },
- X+ #endif
- X { 0, 0, 0, 0, &addpt_ic, F_ADD_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &deletept_ic, F_DELETE_POINT, set_command, null_proc, S_ON, },
- X #ifdef TFX /* put movept before move */
- X***************
- X*** 121,126
- X { 0, 0, 0, 0, &autoarrow_ic, F_AUTOARROW, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &addpt_ic, F_ADD_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &deletept_ic, F_DELETE_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &move_ic, F_MOVE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &movept_ic, F_MOVE_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, ©_ic, F_COPY, set_command, null_proc, S_ON, },
- X
- X--- 130,138 -----
- X #endif
- X { 0, 0, 0, 0, &addpt_ic, F_ADD_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &deletept_ic, F_DELETE_POINT, set_command, null_proc, S_ON, },
- X+ #ifdef TFX /* put movept before move */
- X+ { 0, 0, 0, 0, &movept_ic, F_MOVE_POINT, set_command, null_proc, S_ON, },
- X+ #endif
- X { 0, 0, 0, 0, &move_ic, F_MOVE, set_command, null_proc, S_ON, },
- X #ifndef TFX /* put movept after move */
- X { 0, 0, 0, 0, &movept_ic, F_MOVE_POINT, set_command, null_proc, S_ON, },
- X***************
- X*** 122,127
- X { 0, 0, 0, 0, &addpt_ic, F_ADD_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &deletept_ic, F_DELETE_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &move_ic, F_MOVE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &movept_ic, F_MOVE_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, ©_ic, F_COPY, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &remove_ic, F_REMOVE, set_command, null_proc, S_ON, },
- X
- X--- 134,140 -----
- X { 0, 0, 0, 0, &movept_ic, F_MOVE_POINT, set_command, null_proc, S_ON, },
- X #endif
- X { 0, 0, 0, 0, &move_ic, F_MOVE, set_command, null_proc, S_ON, },
- X+ #ifndef TFX /* put movept after move */
- X { 0, 0, 0, 0, &movept_ic, F_MOVE_POINT, set_command, null_proc, S_ON, },
- X #endif
- X { 0, 0, 0, 0, ©_ic, F_COPY, set_command, null_proc, S_ON, },
- X***************
- X*** 123,128
- X { 0, 0, 0, 0, &deletept_ic, F_DELETE_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &move_ic, F_MOVE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &movept_ic, F_MOVE_POINT, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, ©_ic, F_COPY, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &remove_ic, F_REMOVE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &flip_x_ic, F_FLIP_XAXIS, set_command, null_proc, S_ON, },
- X
- X--- 136,142 -----
- X { 0, 0, 0, 0, &move_ic, F_MOVE, set_command, null_proc, S_ON, },
- X #ifndef TFX /* put movept after move */
- X { 0, 0, 0, 0, &movept_ic, F_MOVE_POINT, set_command, null_proc, S_ON, },
- X+ #endif
- X { 0, 0, 0, 0, ©_ic, F_COPY, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &remove_ic, F_REMOVE, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &flip_x_ic, F_FLIP_XAXIS, set_command, null_proc, S_ON, },
- X***************
- X*** 129,135
- X { 0, 0, 0, 0, &flip_y_ic, F_FLIP_YAXIS, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &rot90_ic, F_ROTATE90, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &rot270_ic, F_ROTATE270, set_command, null_proc, S_ON, },
- X!
- X /* place holders to align some button groups */
- X { 0, -1, 0, 0, &blank_ic, F_NOP, null_proc, null_proc, S_MOMENT, },
- X
- X
- X--- 143,149 -----
- X { 0, 0, 0, 0, &flip_y_ic, F_FLIP_YAXIS, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &rot90_ic, F_ROTATE90, set_command, null_proc, S_ON, },
- X { 0, 0, 0, 0, &rot270_ic, F_ROTATE270, set_command, null_proc, S_ON, },
- X! #ifndef TFX
- X /* place holders to align some button groups */
- X { 0, -1, 0, 0, &blank_ic, F_NOP, null_proc, null_proc, S_MOMENT, },
- X #endif
- X***************
- X*** 132,138
- X
- X /* place holders to align some button groups */
- X { 0, -1, 0, 0, &blank_ic, F_NOP, null_proc, null_proc, S_MOMENT, },
- X!
- X { 0, 1, 0, 0, &grid1_ic, F_GRID1, set_grid, set_grid, S_TOG, },
- X { 0, 1, 0, 0, &grid2_ic, F_GRID2, set_grid, set_grid, S_TOG, },
- X { 1, 2, 0, 0, &unconstraint_ic, F_UNCONSTRAINT, set_geometry, null_proc, S_ON, },
- X
- X--- 146,152 -----
- X #ifndef TFX
- X /* place holders to align some button groups */
- X { 0, -1, 0, 0, &blank_ic, F_NOP, null_proc, null_proc, S_MOMENT, },
- X! #endif
- X { 0, 1, 0, 0, &grid1_ic, F_GRID1, set_grid, set_grid, S_TOG, },
- X { 0, 1, 0, 0, &grid2_ic, F_GRID2, set_grid, set_grid, S_TOG, },
- X { 1, 2, 0, 0, &unconstraint_ic, F_UNCONSTRAINT, set_geometry, null_proc, S_ON, },
- X***************
- X*** 139,146
- X { 0, 2, 0, 0, &mounthattan_ic, F_MOUNTHATTAN, set_geometry, null_proc, S_ON, },
- X { 0, 2, 0, 0, &manhattan_ic, F_MANHATTAN, set_geometry, null_proc, S_ON, },
- X { 0, 2, 0, 0, &mountain_ic, F_MOUNTAIN, set_geometry, null_proc, S_ON, },
- X! /* Yuck. Latex */
- X! /****************
- X { 0, 2, 0, 0, &latexline_ic, F_LATEX_LINE, set_geometry, null_proc, S_ON, },
- X { 0, 2, 0, 0, &latexarrow_ic, F_LATEX_ARROW, set_geometry, null_proc, S_ON, },
- X *****************/
- X
- X--- 153,159 -----
- X { 0, 2, 0, 0, &mounthattan_ic, F_MOUNTHATTAN, set_geometry, null_proc, S_ON, },
- X { 0, 2, 0, 0, &manhattan_ic, F_MANHATTAN, set_geometry, null_proc, S_ON, },
- X { 0, 2, 0, 0, &mountain_ic, F_MOUNTAIN, set_geometry, null_proc, S_ON, },
- X! #ifdef TFX
- X { 0, 2, 0, 0, &latexline_ic, F_LATEX_LINE, set_geometry, null_proc, S_ON, },
- X { 0, 2, 0, 0, &latexarrow_ic, F_LATEX_ARROW, set_geometry, null_proc, S_ON, },
- X #endif
- X***************
- X*** 143,149
- X /****************
- X { 0, 2, 0, 0, &latexline_ic, F_LATEX_LINE, set_geometry, null_proc, S_ON, },
- X { 0, 2, 0, 0, &latexarrow_ic, F_LATEX_ARROW, set_geometry, null_proc, S_ON, },
- X! *****************/
- X { 1, 3, 0, 0, &solidline_ic, F_SET_SOLID_LINE, set_style, null_proc, S_ON, },
- X { 0, 3, 0, 0, &dashline_ic, F_SET_DASH_LINE, set_style, null_proc, S_ON, },
- X { 0, 3, 0, 0, &dottedline_ic, F_SET_DOTTED_LINE, set_style, null_proc, S_ON, },
- X
- X--- 156,162 -----
- X #ifdef TFX
- X { 0, 2, 0, 0, &latexline_ic, F_LATEX_LINE, set_geometry, null_proc, S_ON, },
- X { 0, 2, 0, 0, &latexarrow_ic, F_LATEX_ARROW, set_geometry, null_proc, S_ON, },
- X! #endif
- X { 1, 3, 0, 0, &solidline_ic, F_SET_SOLID_LINE, set_style, null_proc, S_ON, },
- X { 0, 3, 0, 0, &dashline_ic, F_SET_DASH_LINE, set_style, null_proc, S_ON, },
- X { 0, 3, 0, 0, &dottedline_ic, F_SET_DOTTED_LINE, set_style, null_proc, S_ON, },
- X***************
- X*** 201,207
- X /* 4 */ { XtNhSpace, (XtArgVal)SWITCH_ICON_SPACING },
- X /* 5 */ { XtNvSpace, (XtArgVal)SWITCH_ICON_SPACING },
- X /* Fix the size of the panel window by chaining both top & bottom
- X! to the top, and both left & right to the right */
- X /* 6 */ { XtNtop, (XtArgVal)XtChainTop},
- X /* 7 */ { XtNbottom, (XtArgVal)XtChainTop},
- X /* 8 */ { XtNleft, (XtArgVal)XtChainLeft },
- X
- X--- 214,221 -----
- X /* 4 */ { XtNhSpace, (XtArgVal)SWITCH_ICON_SPACING },
- X /* 5 */ { XtNvSpace, (XtArgVal)SWITCH_ICON_SPACING },
- X /* Fix the size of the panel window by chaining both top & bottom
- X! to the top of the form, and both left & right to the right.
- X! If RHS_PANEL, then chain left/right to RIGHT of form */
- X /* 6 */ { XtNtop, (XtArgVal)XtChainTop},
- X /* 7 */ { XtNbottom, (XtArgVal)XtChainTop},
- X /* 8 */ { XtNleft, (XtArgVal)XtChainLeft },
- X***************
- X*** 220,226
- X /* 6 */ { XtNresizable, (XtArgVal) FALSE },
- X /* 7 */ { XtNfromHoriz, (XtArgVal) NULL },
- X /* 8 */ { XtNfromVert, (XtArgVal) NULL },
- X! /* 9 */ { XtNhorizDistance, (XtArgVal) -3*SWITCH_ICON_WIDTH - 6*SWITCH_ICON_SPACING },
- X /* 10 */ { XtNvertDistance, (XtArgVal) 1 },
- X /* Fix the size of the panel window by chaining both top & bottom
- X to the top, and both left & right to the right */
- X
- X--- 234,240 -----
- X /* 6 */ { XtNresizable, (XtArgVal) FALSE },
- X /* 7 */ { XtNfromHoriz, (XtArgVal) NULL },
- X /* 8 */ { XtNfromVert, (XtArgVal) NULL },
- X! /* 9 */ { XtNhorizDistance, (XtArgVal) SWITCH_ICON_SPACING },
- X /* 10 */ { XtNvertDistance, (XtArgVal) 1 },
- X /* Fix the size of the panel window by chaining both top & bottom
- X to the top of the form, and both left & right to the right */
- X***************
- X*** 223,229
- X /* 9 */ { XtNhorizDistance, (XtArgVal) -3*SWITCH_ICON_WIDTH - 6*SWITCH_ICON_SPACING },
- X /* 10 */ { XtNvertDistance, (XtArgVal) 1 },
- X /* Fix the size of the panel window by chaining both top & bottom
- X! to the top, and both left & right to the right */
- X /* 11 */ { XtNtop, (XtArgVal)XtChainBottom},
- X /* 12 */ { XtNbottom, (XtArgVal)XtChainBottom},
- X /* 13 */ { XtNleft, (XtArgVal)XtChainLeft },
- X
- X--- 237,243 -----
- X /* 9 */ { XtNhorizDistance, (XtArgVal) SWITCH_ICON_SPACING },
- X /* 10 */ { XtNvertDistance, (XtArgVal) 1 },
- X /* Fix the size of the panel window by chaining both top & bottom
- X! to the top of the form, and both left & right to the right */
- X /* 11 */ { XtNtop, (XtArgVal)XtChainBottom},
- X /* 12 */ { XtNbottom, (XtArgVal)XtChainBottom},
- X /* 13 */ { XtNleft, (XtArgVal)XtChainLeft },
- X***************
- X*** 230,235
- X /* 14 */ { XtNright, (XtArgVal)XtChainLeft },
- X };
- X
- X /* widget arguments to show the current fill color and line thickness*/
- X
- X static Arg indicator_panel_args[] =
- X
- X--- 244,268 -----
- X /* 14 */ { XtNright, (XtArgVal)XtChainLeft },
- X };
- X
- X+ static Arg ind_box_args[] =
- X+ {
- X+ /* 0 */ { XtNx, (XtArgVal)0 },
- X+ /* 1 */ { XtNy, (XtArgVal)0 },
- X+ /* 2 */ { XtNwidth, (XtArgVal)0 },
- X+ /* 3 */ { XtNheight, (XtArgVal)0 },
- X+ /* 4 */ { XtNhSpace, (XtArgVal)SWITCH_ICON_SPACING },
- X+ /* 5 */ { XtNvSpace, (XtArgVal)SWITCH_ICON_SPACING },
- X+ /* 6 */ { XtNfromVert, (XtArgVal) NULL },
- X+ /* 7 */ { XtNvertDistance, (XtArgVal) SWITCH_ICON_SPACING },
- X+ /* Fix the size of the panel window by chaining both top & bottom
- X+ to the top of the form, and both left & right to the right
- X+ If RHS_PANEL, then chain left/right to RIGHT of form */
- X+ /* 8 */ { XtNtop, (XtArgVal)XtChainTop},
- X+ /* 9 */ { XtNbottom, (XtArgVal)XtChainTop},
- X+ /* 10 */ { XtNleft, (XtArgVal)XtChainLeft },
- X+ /* 11 */ { XtNright, (XtArgVal)XtChainLeft },
- X+ };
- X+
- X /* widget arguments to show the current fill color and line thickness*/
- X
- X static Arg indicator_panel_args[] =
- X***************
- X*** 241,257
- X /* 4 */ { XtNheight, (XtArgVal) SWITCH_ICON_HEIGHT },
- X /* 5 */ { XtNresizable, (XtArgVal) FALSE },
- X /* 6 */ { XtNborderWidth, (XtArgVal) 1},
- X! /* 7 */ { XtNhorizDistance, (XtArgVal) 0 },
- X! /* 8 */ { XtNvertDistance, (XtArgVal) 0 },
- X! /* 9 */ { XtNfromHoriz, (XtArgVal) NULL },
- X! /* 10 */ { XtNfromVert, (XtArgVal) NULL },
- X! /* Fix the size of the panel window by chaining both top & bottom
- X! to the top, and both left & right to the right */
- X! /* 11 */ { XtNtop, (XtArgVal)XtChainTop},
- X! /* 12 */ { XtNbottom, (XtArgVal)XtChainTop},
- X! /* 13 */ { XtNleft, (XtArgVal)XtChainLeft },
- X! /* 14 */ { XtNright, (XtArgVal)XtChainLeft },
- X! /* 15 */ { XtNbackgroundPixmap, (XtArgVal) NULL },
- X };
- X
- X extern void button_select();
- X
- X--- 274,280 -----
- X /* 4 */ { XtNheight, (XtArgVal) SWITCH_ICON_HEIGHT },
- X /* 5 */ { XtNresizable, (XtArgVal) FALSE },
- X /* 6 */ { XtNborderWidth, (XtArgVal) 1},
- X! /* 7 */ { XtNbackgroundPixmap, (XtArgVal) NULL },
- X };
- X
- X static void button_select();
- X***************
- X*** 254,260
- X /* 15 */ { XtNbackgroundPixmap, (XtArgVal) NULL },
- X };
- X
- X! extern void button_select();
- X
- X /* we aren't using the callback anymore - see sel_but() */
- X static XtCallbackRec button_callbacks[] =
- X
- X--- 277,283 -----
- X /* 7 */ { XtNbackgroundPixmap, (XtArgVal) NULL },
- X };
- X
- X! static void button_select();
- X
- X /* we aren't using the callback anymore - see sel_but() */
- X static XtCallbackRec button_callbacks[] =
- X***************
- X*** 285,291
- X extern int PANEL2_LEFT, PANEL2_TOP, PANEL2_HEIGHT, PANEL2_WID;
- X extern int CANVAS_HEIGHT, ICON_COLUMN;
- X
- X! extern right_but();
- X
- X /* button selection event handler */
- X extern sel_but();
- X
- X--- 308,314 -----
- X extern int PANEL2_LEFT, PANEL2_TOP, PANEL2_HEIGHT, PANEL2_WID;
- X extern int CANVAS_HEIGHT, ICON_COLUMN;
- X
- X! static right_but();
- X
- X /* button selection event handler */
- X static sel_but();
- X***************
- X*** 288,294
- X extern right_but();
- X
- X /* button selection event handler */
- X! extern sel_but();
- X
- X int
- X init_panel(tool)
- X
- X--- 311,317 -----
- X static right_but();
- X
- X /* button selection event handler */
- X! static sel_but();
- X
- X int
- X init_panel(tool)
- X***************
- X*** 297,302
- X register int i;
- X register F_switch *sw;
- X
- X panel_args[2].value = PANEL_WID =
- X (SWITCH_ICON_WIDTH + 2 + SWITCH_ICON_SPACING) * ICON_COLUMN
- X + SWITCH_ICON_SPACING;
- X
- X--- 320,326 -----
- X register int i;
- X register F_switch *sw;
- X
- X+ /* width */
- X panel_args[2].value = PANEL_WID =
- X (SWITCH_ICON_WIDTH + 2 + SWITCH_ICON_SPACING) * ICON_COLUMN
- X + SWITCH_ICON_SPACING;
- X***************
- X*** 300,305
- X panel_args[2].value = PANEL_WID =
- X (SWITCH_ICON_WIDTH + 2 + SWITCH_ICON_SPACING) * ICON_COLUMN
- X + SWITCH_ICON_SPACING;
- X panel_args[3].value = PANEL_HEIGHT = CANVAS_HEIGHT + RULER_WIDTH + MSG_HEIGHT;
- X panel_sw = XtCreateWidget("panel", boxWidgetClass, tool, panel_args,
- X XtNumber(panel_args));
- X
- X--- 324,330 -----
- X panel_args[2].value = PANEL_WID =
- X (SWITCH_ICON_WIDTH + 2 + SWITCH_ICON_SPACING) * ICON_COLUMN
- X + SWITCH_ICON_SPACING;
- X+ /* height */
- X panel_args[3].value = PANEL_HEIGHT = CANVAS_HEIGHT + RULER_WIDTH + MSG_HEIGHT;
- X panel_sw = XtCreateWidget("panel", boxWidgetClass, tool, panel_args,
- X XtNumber(panel_args));
- X***************
- X*** 314,320
- X sw->but.widget = XtCreateManagedWidget(
- X "button", commandWidgetClass,
- X panel_sw, button_args, XtNumber(button_args));
- X! /* allow left and right buttons (callbacks pass same data for ANY button) */
- X XtAddEventHandler(sw->but.widget,ButtonPressMask,(Boolean) 0,
- X sel_but, (caddr_t) sw);
- X }
- X
- X--- 339,345 -----
- X sw->but.widget = XtCreateManagedWidget(
- X "button", commandWidgetClass,
- X panel_sw, button_args, XtNumber(button_args));
- X! /* allow left & right buttons (callbacks pass same data for ANY button) */
- X XtAddEventHandler(sw->but.widget,ButtonPressMask,(Boolean) 0,
- X sel_but, (caddr_t) sw);
- X }
- X***************
- X*** 333,341
- X panel2_args[2].value = PANEL2_WID = 2 * N_SWITCHES2 *
- X (SWITCH_ICON_WIDTH + SWITCH_ICON_SPACING)
- X + SWITCH_ICON_SPACING;
- X! panel2_args[3].value = PANEL2_HEIGHT = SWITCH_ICON_HEIGHT + 3 * SWITCH_ICON_SPACING;
- X! panel2_args[7].value = (XtArgVal) panel_sw; /* horiz offset from panel_sw */
- X! panel2_args[8].value = (XtArgVal) psfont; /* vert offset from font window */
- X
- X panel2_sw = XtCreateWidget("panel2", boxWidgetClass, tool, panel2_args,
- X XtNumber(panel2_args));
- X
- X--- 358,365 -----
- X panel2_args[2].value = PANEL2_WID = 2 * N_SWITCHES2 *
- X (SWITCH_ICON_WIDTH + SWITCH_ICON_SPACING)
- X + SWITCH_ICON_SPACING;
- X! panel2_args[3].value=PANEL2_HEIGHT= SWITCH_ICON_HEIGHT + 3*SWITCH_ICON_SPACING;
- X! panel2_args[8].value = (XtArgVal) psfont; /* vert offset from font window */
- X
- X panel2_sw = XtCreateWidget("bottom_panel", boxWidgetClass, tool, panel2_args,
- X XtNumber(panel2_args));
- X***************
- X*** 337,343
- X panel2_args[7].value = (XtArgVal) panel_sw; /* horiz offset from panel_sw */
- X panel2_args[8].value = (XtArgVal) psfont; /* vert offset from font window */
- X
- X! panel2_sw = XtCreateWidget("panel2", boxWidgetClass, tool, panel2_args,
- X XtNumber(panel2_args));
- X for (i = 0; i < N_SWITCHES2; ++i)
- X {
- X
- X--- 361,367 -----
- X panel2_args[3].value=PANEL2_HEIGHT= SWITCH_ICON_HEIGHT + 3*SWITCH_ICON_SPACING;
- X panel2_args[8].value = (XtArgVal) psfont; /* vert offset from font window */
- X
- X! panel2_sw = XtCreateWidget("bottom_panel", boxWidgetClass, tool, panel2_args,
- X XtNumber(panel2_args));
- X for (i = 0; i < N_SWITCHES2; ++i)
- X {
- X***************
- X*** 356,361
- X return (1);
- X }
- X
- X init_indicator_panel(tool)
- X TOOL tool;
- X {
- X
- X--- 380,387 -----
- X return (1);
- X }
- X
- X+ Widget ind_box;
- X+
- X init_indicator_panel(tool)
- X TOOL tool;
- X {
- X***************
- X*** 359,369
- X init_indicator_panel(tool)
- X TOOL tool;
- X {
- X! /* vert position */
- X! indicator_panel_args[8].value = (XtArgVal) 2*SWITCH_ICON_SPACING;
- X! indicator_panel_args[9].value = (XtArgVal) panel_sw;
- X! indicator_panel_args[10].value = (XtArgVal) panel_sw;
- X! indicator_panel_args[15].value = (XtArgVal) ind_fill_pm[0];/* white pixmap */
- X
- X /* horiz position for line thickness indicator */
- X indicator_panel_args[7].value = (XtArgVal)
- X
- X--- 385,395 -----
- X init_indicator_panel(tool)
- X TOOL tool;
- X {
- X! /* width */
- X! ind_box_args[2].value =
- X! (SWITCH_ICON_WIDTH + 2 + SWITCH_ICON_SPACING)*3 + SWITCH_ICON_SPACING;
- X! /* height */
- X! ind_box_args[3].value = SWITCH_ICON_HEIGHT+2*SWITCH_ICON_SPACING;
- X
- X /* put below bottom of panel_sw */
- X ind_box_args[6].value = (XtArgVal) panel_sw;
- X***************
- X*** 365,375
- X indicator_panel_args[10].value = (XtArgVal) panel_sw;
- X indicator_panel_args[15].value = (XtArgVal) ind_fill_pm[0];/* white pixmap */
- X
- X! /* horiz position for line thickness indicator */
- X! indicator_panel_args[7].value = (XtArgVal)
- X! -SWITCH_ICON_WIDTH*ICON_COLUMN - SWITCH_ICON_SPACING*(ICON_COLUMN+2);
- X! line_thick_panel = XtCreateManagedWidget( "indicator", boxWidgetClass,
- X! tool, indicator_panel_args, XtNumber(indicator_panel_args));
- X
- X /* horiz position for rounded-corner box radius indicator */
- X indicator_panel_args[7].value += SWITCH_ICON_WIDTH+1.5*SWITCH_ICON_SPACING;
- X
- X--- 391,398 -----
- X /* height */
- X ind_box_args[3].value = SWITCH_ICON_HEIGHT+2*SWITCH_ICON_SPACING;
- X
- X! /* put below bottom of panel_sw */
- X! ind_box_args[6].value = (XtArgVal) panel_sw;
- X
- X ind_box = XtCreateWidget("indicator", boxWidgetClass, tool, ind_box_args,
- X XtNumber(ind_box_args));
- X***************
- X*** 371,385
- X line_thick_panel = XtCreateManagedWidget( "indicator", boxWidgetClass,
- X tool, indicator_panel_args, XtNumber(indicator_panel_args));
- X
- X! /* horiz position for rounded-corner box radius indicator */
- X! indicator_panel_args[7].value += SWITCH_ICON_WIDTH+1.5*SWITCH_ICON_SPACING;
- X! radius_panel = XtCreateManagedWidget( "indicator", boxWidgetClass,
- X! tool, indicator_panel_args, XtNumber(indicator_panel_args));
- X!
- X! /* horiz position for fill_area color */
- X! indicator_panel_args[7].value += SWITCH_ICON_WIDTH+1.5*SWITCH_ICON_SPACING;
- X! fill_panel = XtCreateManagedWidget( "indicator", boxWidgetClass,
- X! tool, indicator_panel_args, XtNumber(indicator_panel_args));
- X }
- X
- X static GC button_gc;
- X
- X--- 394,418 -----
- X /* put below bottom of panel_sw */
- X ind_box_args[6].value = (XtArgVal) panel_sw;
- X
- X! ind_box = XtCreateWidget("indicator", boxWidgetClass, tool, ind_box_args,
- X! XtNumber(ind_box_args));
- X!
- X! indicator_panel_args[7].value = (XtArgVal) ind_fill_pm[0];/* white pixmap */
- X!
- X! /* horiz position for line thickness indicator */
- X! indicator_panel_args[0].value = (XtArgVal) SWITCH_ICON_SPACING;
- X! line_thick_panel = XtCreateManagedWidget( "linewidth_indicator", boxWidgetClass,
- X! ind_box, indicator_panel_args, XtNumber(indicator_panel_args));
- X!
- X! /* horiz position for rounded-corner box radius indicator */
- X! indicator_panel_args[0].value += SWITCH_ICON_WIDTH+SWITCH_ICON_SPACING;
- X! radius_panel = XtCreateManagedWidget( "radius_indicator", boxWidgetClass,
- X! ind_box, indicator_panel_args, XtNumber(indicator_panel_args));
- X!
- X! /* horiz position for fill_area color */
- X! indicator_panel_args[0].value += SWITCH_ICON_WIDTH+SWITCH_ICON_SPACING;
- X! fill_panel = XtCreateManagedWidget( "fill_indicator", boxWidgetClass,
- X! ind_box, indicator_panel_args, XtNumber(indicator_panel_args));
- X }
- X
- X static GC button_gc;
- X***************
- X*** 384,389
- X
- X static GC button_gc;
- X
- X setup_panel()
- X {
- X register int i;
- X
- X--- 417,424 -----
- X
- X static GC button_gc;
- X
- X+ /* come here after panel widget is realized to put some bitmaps etc. things in it */
- X+
- X setup_panel()
- X {
- X register int i;
- X***************
- X*** 1043,1050
- X then giving it the modified one again. Otherwise, it sees
- X that the pixmap ID is not changed and doesn't actually draw
- X it into the widget window */
- X! indicator_panel_args[15].value = 0;
- X! XtSetValues(line_thick_panel, &indicator_panel_args[15], 1);
- X
- X /* put the pixmap in the widget background */
- X indicator_panel_args[15].value = line_pm;
- X
- X--- 1078,1085 -----
- X then giving it the modified one again. Otherwise, it sees
- X that the pixmap ID is not changed and doesn't actually draw
- X it into the widget window */
- X! indicator_panel_args[7].value = 0;
- X! XtSetValues(line_thick_panel, &indicator_panel_args[7], 1);
- X
- X /* put the pixmap in the widget background */
- X indicator_panel_args[7].value = line_pm;
- X***************
- X*** 1047,1054
- X XtSetValues(line_thick_panel, &indicator_panel_args[15], 1);
- X
- X /* put the pixmap in the widget background */
- X! indicator_panel_args[15].value = line_pm;
- X! XtSetValues(line_thick_panel, &indicator_panel_args[15], 1);
- X put_msg("LINE Thickness = %d",line_thickness);
- X }
- X
- X
- X--- 1082,1089 -----
- X XtSetValues(line_thick_panel, &indicator_panel_args[7], 1);
- X
- X /* put the pixmap in the widget background */
- X! indicator_panel_args[7].value = line_pm;
- X! XtSetValues(line_thick_panel, &indicator_panel_args[7], 1);
- X put_msg("LINE Thickness = %d",line_thickness);
- X }
- X
- X***************
- X*** 1094,1101
- X then giving it the modified one again. Otherwise, it sees
- X that the pixmap ID is not changed and doesn't actually draw
- X it into the widget window */
- X! indicator_panel_args[15].value = 0;
- X! XtSetValues(radius_panel, &indicator_panel_args[15], 1);
- X
- X /* put the pixmap in the widget background */
- X indicator_panel_args[15].value = radius_pm;
- X
- X--- 1129,1136 -----
- X then giving it the modified one again. Otherwise, it sees
- X that the pixmap ID is not changed and doesn't actually draw
- X it into the widget window */
- X! indicator_panel_args[7].value = 0;
- X! XtSetValues(radius_panel, &indicator_panel_args[7], 1);
- X
- X /* put the pixmap in the widget background */
- X indicator_panel_args[7].value = radius_pm;
- X***************
- X*** 1098,1105
- X XtSetValues(radius_panel, &indicator_panel_args[15], 1);
- X
- X /* put the pixmap in the widget background */
- X! indicator_panel_args[15].value = radius_pm;
- X! XtSetValues(radius_panel, &indicator_panel_args[15], 1);
- X put_msg("ROUNDED-CORNER BOX Radius = %d",cur_radius);
- X }
- X
- X
- X--- 1133,1140 -----
- X XtSetValues(radius_panel, &indicator_panel_args[7], 1);
- X
- X /* put the pixmap in the widget background */
- X! indicator_panel_args[7].value = radius_pm;
- X! XtSetValues(radius_panel, &indicator_panel_args[7], 1);
- X put_msg("ROUNDED-CORNER BOX Radius = %d",cur_radius);
- X }
- X
- X***************
- X*** 1122,1129
- X show_fill_color()
- X {
- X /* put fill pixmap in widget background */
- X! indicator_panel_args[15].value = ind_fill_pm[cur_areafill-1];
- X! XtSetValues(fill_panel, &indicator_panel_args[15], 1);
- X put_fmsg("FILL GRAY = %.2f", 1.0-(cur_areafill-1.0)/(NUMFILLPATS-1.0));
- X }
- X
- X
- X--- 1157,1164 -----
- X show_fill_color()
- X {
- X /* put fill pixmap in widget background */
- X! indicator_panel_args[7].value = ind_fill_pm[cur_areafill-1];
- X! XtSetValues(fill_panel, &indicator_panel_args[7], 1);
- X put_fmsg("FILL GRAY = %.2f", 1.0-(cur_areafill-1.0)/(NUMFILLPATS-1.0));
- X }
- X
- X***************
- X*** 1181,1187
- X edit_button(sw)
- X F_switch *sw;
- X {
- X! init_msg_receiving(edit_file, "Edit file : ");
- X }
- X
- X /* change directories */
- X
- X--- 1216,1222 -----
- X edit_button(sw)
- X F_switch *sw;
- X {
- X! edit();
- X }
- X
- X /* change directories */
- X***************
- X*** 1231,1236
- X printer=printer_list[cur_printer];
- X put_msg("SELECT PRINTER: %s",printer);
- X
- X /* write the printer name in the background pixmap */
- X XDrawImageString(tool_d, print_sel_pm, button_gc,
- X 32, 14, printer, strlen(printer));
- X
- X--- 1266,1274 -----
- X printer=printer_list[cur_printer];
- X put_msg("SELECT PRINTER: %s",printer);
- X
- X+ /* first erase any existing string in pixmap */
- X+ XDrawImageString(tool_d, print_sel_pm, button_gc,
- X+ 6, 28, " ", 8);
- X /* write the printer name in the background pixmap */
- X XDrawImageString(tool_d, print_sel_pm, button_gc,
- X 6, 28, printer, strlen(printer));
- X***************
- X*** 1233,1239
- X
- X /* write the printer name in the background pixmap */
- X XDrawImageString(tool_d, print_sel_pm, button_gc,
- X! 32, 14, printer, strlen(printer));
- X
- X /* Fool the toolkit by changing the background pixmap to 0
- X then giving it the modified one again. Otherwise, it sees
- X
- X--- 1271,1277 -----
- X 6, 28, " ", 8);
- X /* write the printer name in the background pixmap */
- X XDrawImageString(tool_d, print_sel_pm, button_gc,
- X! 6, 28, printer, strlen(printer));
- X
- X /* Fool the toolkit by changing the background pixmap to 0
- X then giving it the modified one again. Otherwise, it sees
- END_OF_FILE
- if test 29567 -ne `wc -c <'panel.c.diff'`; then
- echo shar: \"'panel.c.diff'\" unpacked with wrong size!
- fi
- # end of 'panel.c.diff'
- fi
- echo shar: End of archive 3 \(of 3\).
- cp /dev/null ark3isdone
- MISSING=""
- for I in 1 2 3 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 3 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- dan
- -----------------------------------------------------------
- O'Reilly && Associates
- argv@sun.com / argv@ora.com
- 632 Petaluma Ave, Sebastopol, CA 95472
- 800-338-NUTS, in CA: 800-533-NUTS, FAX 707-829-0104
- Opinions expressed reflect those of the author only.
-